<ul>
    <?php
    if (isset($aCompany_Adv) && count($aCompany_Adv) > 0) {
        $i = 1;
        foreach ($aCompany_Adv as $key => $item): {
                if (($i == 1) || ($i == 4)) {
                    ?>         
                    <li>
                        <img src="<?php echo $img_url; ?>style/<?php echo $item->img_thumb; ?>" border="0">
                        <a href="<?php echo $item->url; ?>"><?php echo $item->company_adv_name; ?></a>
                    </li>
                <?php
            } else {
                ?>
                    <li class="margin">
                        <img src="<?php echo $img_url; ?>style/<?php echo $item->img_thumb; ?>" border="0">
                        <a href="<?php echo $item->url; ?>"><?php echo $item->company_adv_name; ?></a>
                    </li>
                    <?php
                }
                $i++;
            }
        endforeach;
    } else {
        ?>             
        <div align='center' class='nodata'><?php echo $page_nodata; ?></div>
        <?php
    }
    ?>          
</ul>
<div id="paging">
    <?php echo $paging; ?>
</div>           